package Work1_;
import java.io.FileNotFoundException;
import java.io.*;
import java.util.Properties;
/*
 *@Student 张策
 */
public class tEXT2 {
    public static void main(String[] args) throws Exception {
        Properties properties = new Properties();
        properties.setProperty("N1", "1");
        properties.setProperty("N2", "2");
        properties.setProperty("N3", "3");
        try {
            properties.store(new FileOutputStream("src\\mysql.properties"), null);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        properties.load(new FileReader("src\\mysql.properties"));
        properties.list(System.out);
        String user = properties.getProperty("user");
        System.out.println(user);
    }
}
